package com.software.levelupserver.service;

import com.software.levelupserver.entity.User;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface UserService {
    User getUserByEmail(String email);
    void getCodeForRegister(String mail);
    String getCodeForUpdatePassword(String mail);
    User registerUser(User user, String code);
    User updateUser(User user, MultipartFile multipartFile) throws IOException;
    void updatePassword(User user, String code);
    boolean updateUserLoginTime(); //更新用户活跃时间
    User findUserByUserId(int userId);

    List findAllUsers(Integer pageNum, Integer pageSize);
    int deleteUserById(Integer userId);
	int countUsersByLoginTime(); //获取当前日期活跃用户数量
    int countUsers(); //获取用户总数量

    int updateExperience(double experience); //更新用户的经验值
    User updateGrade(int gradeId); //更新用户的经验值

}
